/* pic.h */

#ifndef DODO_PIC_H
#define DODO_PIC_H

#include <dodo_plot/kernel/plotfwd.h>
#include <dodo_plot/kernel/p_node.h>

namespace dodo_plot
{

// class T requirement:
// double height()
// double width()
// void draw(Canvas&, Position&)
template<class T> class Pic : public P_Node
{
	friend class Picture;

private:
	typedef T value_type;

	Pic(const T& data) : data_(data) { };

	double height() const { return data_.height(); }
	double width() const { return data_.width(); }
	Position local_pos() const { return data_.local_pos(); }
	void draw(const Plotter& plotter) const {  data_.draw(plotter); }

	T data_;
};


}
#endif //DODO_PIC_H

